package chapter06

object Test09_AbstractClass {
  def main(args: Array[String]): Unit = {

  }
}

abstract class Person9 {
  //非抽象属性
  val name: String = "person"
  //抽象属性
  var age: Int

  //非抽象方法
  def eat() = {
    println("person eat")
  }

  def sleep(): Unit
}

class Student9 extends Person9 {
  override var age: Int = 18

  override def sleep(): Unit = {
    println("student sleep")
  }
}
